package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 * 关注
 */
public class Attention implements Serializable {
    /**
     * 关注的用户
     */
    private Integer uid;
    /**
     * 被关注的用户
     */
    private Integer otherid;

    public Attention(Integer uid, Integer otherid) {
        this.uid = uid;
        this.otherid = otherid;
    }

    public Attention() {
    }

    public static AttentionBuilder builder() {
        return new AttentionBuilder();
    }

    public Integer getUid() {
        return this.uid;
    }

    public Integer getOtherid() {
        return this.otherid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setOtherid(Integer otherid) {
        this.otherid = otherid;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Attention)) return false;
        final Attention other = (Attention) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$otherid = this.getOtherid();
        final Object other$otherid = other.getOtherid();
        if (this$otherid == null ? other$otherid != null : !this$otherid.equals(other$otherid)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Attention;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $otherid = this.getOtherid();
        result = result * PRIME + ($otherid == null ? 43 : $otherid.hashCode());
        return result;
    }

    public String toString() {
        return "Attention(uid=" + this.getUid() + ", otherid=" + this.getOtherid() + ")";
    }

    public static class AttentionBuilder {
        private Integer uid;
        private Integer otherid;

        AttentionBuilder() {
        }

        public Attention.AttentionBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public Attention.AttentionBuilder otherid(Integer otherid) {
            this.otherid = otherid;
            return this;
        }

        public Attention build() {
            return new Attention(uid, otherid);
        }

        public String toString() {
            return "Attention.AttentionBuilder(uid=" + this.uid + ", otherid=" + this.otherid + ")";
        }
    }
}
